home *** CD-ROM | disk | FTP | other *** search
/ An Introduction to Progr…l Basic 6.0 (4th Edition) / An Introduction to Programming using Visual Basic 6.0.iso / PROGRAMS / CH9 / 9-1-1.FRM (.txt) next >
Encoding:
Visual Basic Form  |  1998-09-18  |  1.8 KB  |  63 lines

  1. VERSION 5.00
  2. Begin VB.Form frm9_1_1 
  3.    Caption         =   "Fixed-length Strings"
  4.    ClientHeight    =   1275
  5.    ClientLeft      =   1095
  6.    ClientTop       =   1485
  7.    ClientWidth     =   2895
  8.    BeginProperty Font 
  9.       Name            =   "MS Sans Serif"
  10.       Size            =   8.25
  11.       Charset         =   0
  12.       Weight          =   700
  13.       Underline       =   0   'False
  14.       Italic          =   0   'False
  15.       Strikethrough   =   0   'False
  16.    EndProperty
  17.    LinkTopic       =   "Form1"
  18.    PaletteMode     =   1  'UseZOrder
  19.    ScaleHeight     =   1275
  20.    ScaleWidth      =   2895
  21.    Begin VB.PictureBox picOutput 
  22.       BeginProperty Font 
  23.          Name            =   "Courier New"
  24.          Size            =   9.75
  25.          Charset         =   0
  26.          Weight          =   700
  27.          Underline       =   0   'False
  28.          Italic          =   0   'False
  29.          Strikethrough   =   0   'False
  30.       EndProperty
  31.       Height          =   1095
  32.       Left            =   960
  33.       ScaleHeight     =   1035
  34.       ScaleWidth      =   1635
  35.       TabIndex        =   1
  36.       Top             =   120
  37.       Width           =   1695
  38.    End
  39.    Begin VB.CommandButton cmdGo 
  40.       Caption         =   "Go"
  41.       Height          =   495
  42.       Left            =   240
  43.       TabIndex        =   0
  44.       Top             =   240
  45.       Width           =   615
  46.    End
  47. Attribute VB_Name = "frm9_1_1"
  48. Attribute VB_GlobalNameSpace = False
  49. Attribute VB_Creatable = False
  50. Attribute VB_PredeclaredId = True
  51. Attribute VB_Exposed = False
  52. Private Sub cmdGo_Click()
  53.   Dim city As String * 9
  54.   'Illustrate fixed-length strings
  55.   picOutput.Cls
  56.   picOutput.Print "123456789"
  57.   city = "San Francisco"
  58.   picOutput.Print city
  59.   city = "Detroit"
  60.   picOutput.Print city; "MI"
  61.   picOutput.Print Len(city)
  62. End Sub
  63.